#include <stdio.h>
#include <stdlib.h>

#define TEXT(x) #x
 
#define PRINTF_INFO(x)                                                         \
    printf(#x "[%s %s %s: %s() => line: %d] ", __DATE__, __TIME__, __FILE__, __func__, __LINE__);
 
#define LOGINFO(...)                                                           \
    PRINTF_INFO(\33[32m);                                                      \
    printf(__VA_ARGS__);                                                       \
    printf(TEXT(\33[37m))
 
#define LOGWARN(...)                                                           \
    PRINTF_INFO(\33[33m);                                                      \
    printf(__VA_ARGS__);                                                       \
    printf(TEXT(\33[37m))
 
#define LOGERROR(...)                                                          \
    PRINTF_INFO(\33[31m);                                                      \
    printf(__VA_ARGS__);                                                       \
    printf(TEXT(\33[37m))

int main(int argc, char **argv)
{

	LOGINFO("this's log info\n");
    LOGWARN("this's log warning\n");
    LOGERROR("this's log error\n");
	
	exit(0);
}
